/*
 * FileName: SysLogServiceImpl.java
 *
 * Company: 
 * Copyright 2011-2012 (C) Ultrapower Software CO., LTD. All Rights Reserved.
 */
package com.jmeurope.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.jmeurope.dao.SysLogDao;
import com.jmeurope.model.SysLog;
import com.jmeurope.service.SysLogService;

/**
 * <p>
 * Description: 
 * </p>
 *
 * @author wangwei  leo_java@163.com
 * @version 1.0

 * <p>
 * History: 
 *
 * Date                     Author         Version     Description
 * ---------------------------------------------------------------------------------
 * Dec 26, 2011 12:25:46 PM          wangwei        1.0         To create
 * </p>
 *
 * @since 
 * @see     
 */
@Service
@Transactional(propagation=Propagation.REQUIRED, rollbackFor=Exception.class)  
public class SysLogServiceImpl implements SysLogService {
	@Autowired
	private SysLogDao logDao;
	@Override
	public Integer addSysLog(SysLog log) throws Exception {
		return logDao.insert(log);
	}
	@Override
	public List<SysLog> getAllLogs() throws Exception {
		List<SysLog> logs = logDao.findAll();
		return logs;
	}

}
